﻿
using System.Data;
using System.Windows;
using TransportAnalizer_2._0.Views;
using TransportAnalizer_2._0.ViewModels;
using TransportAnalizer_2._0.Model;
using Microsoft.Practices.Unity;

namespace TransportAnalizer_2._0
{
    /// <summary>
    /// Логика взаимодействия для App.xaml
    /// </summary>
    public partial class App : Application
    {
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            var container = new UnityContainer();

            container.RegisterType<IBusinessContextFactory, BusinessContextFactory>();
            container.RegisterType<NodeViewModel>();

            var window = new NodeView
            {
                DataContext = container.Resolve<NodeViewModel>()
            };

            window.ShowDialog();
        }
    }
}
